package com.itheima.d5_lock;

/**
 * 取钱线程类
 */
public class DrawThread extends Thread{
    private Account account;

    public DrawThread(Account account, String name){//account为账户 name是取钱人的名字
        super(name);
        this.account = account;
    }
    @Override
    public void run() {
        //小明小红取钱
        account.drawMoney(100000);
    }
}
